import io from 'socket.io-client'
import store from '../../store/index'
import {server} from '../../config/address'
const socket = io(server)

socket.on('paint',(msg)=>{
  store.commit('changePaint',msg.data)
})
socket.on('painter',(msg)=>{
  store.commit('changePainter',msg.data)
})
export default socket
